From 3169b9cf23f661a463401b6ea2cde977696c69a0 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Thu, 15 Feb 2007 14:12:32 +0000 Subject: [PATCH] linux: miscellaneous changes after upgrade through 2.6.17. Signed-off-by: Jan Beulich --- linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S | 4 +--- linux-2.6-xen-sparse/arch/x86_64/kernel/head-xen.S | 2 +- linux-2.6-xen-sparse/arch/x86_64/kernel/mpparse-xen.c | 2 +- linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c | 4 +--- linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c | 6 ++---- linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c | 9 +++++---- linux-2.6-xen-sparse/drivers/xen/core/smpboot.c | 3 +-- 7 files changed, 12 insertions(+), 18 deletions(-) diff --git a/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S b/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S index ab407406e5..cfe59a6783 100644 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S @@ -32,9 +32,6 @@ */ #define ASSEMBLY 1 -#ifdef CONFIG_DEBUG_INFO -#undef CONFIG_DEBUG_INFO -#endif #include #include #include @@ -537,6 +534,7 @@ END(stub_rt_sigreturn) */ retint_check: + CFI_DEFAULT_STACK movl threadinfo_flags(%rcx),%edx andl %edi,%edx CFI_REMEMBER_STATE diff --git a/linux-2.6-xen-sparse/arch/x86_64/kernel/head-xen.S b/linux-2.6-xen-sparse/arch/x86_64/kernel/head-xen.S index c2446d0fa9..64add58353 100644 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/head-xen.S +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/head-xen.S @@ -25,7 +25,7 @@ #include - .text + .section .bootstrap.text, "ax", @progbits .code64 #define VIRT_ENTRY_OFFSET 0x0 .org VIRT_ENTRY_OFFSET diff --git a/linux-2.6-xen-sparse/arch/x86_64/kernel/mpparse-xen.c b/linux-2.6-xen-sparse/arch/x86_64/kernel/mpparse-xen.c index 57a824469e..5ae1c68bd4 100644 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/mpparse-xen.c +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/mpparse-xen.c @@ -170,7 +170,7 @@ static void __cpuinit MP_processor_info (struct mpc_config_processor *m) cpu_set(cpu, cpu_present_map); } #else -void __init MP_processor_info (struct mpc_config_processor *m) +static void __cpuinit MP_processor_info (struct mpc_config_processor *m) { num_processors++; } diff --git a/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c b/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c index 48fb939f3c..ada9751fb3 100644 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c @@ -499,8 +499,6 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) * This is basically '__unlazy_fpu', except that we queue a * multicall to indicate FPU task switch, rather than * synchronously trapping to Xen. - * This must be here to ensure both math_state_restore() and - * kernel_fpu_begin() work consistently. * The AMD workaround requires it to be after DS reload, or * after DS has been cleared, which we do in __prepare_arch_switch. */ @@ -579,7 +577,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) HYPERVISOR_set_segment_base(SEGBASE_GS_USER, next->gs); /* - * Switch the PDA and FPU contexts. + * Switch the PDA context. */ prev->userrsp = read_pda(oldrsp); write_pda(oldrsp, next->userrsp); diff --git a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c index 80ef5cfabc..c41dc2a8ab 100644 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c @@ -580,6 +580,8 @@ static void discover_ebda(void) if (ebda_size > 64*1024) ebda_size = 64*1024; } +#else +#define discover_ebda() ((void)0) #endif void __init setup_arch(char **cmdline_p) @@ -673,9 +675,7 @@ void __init setup_arch(char **cmdline_p) check_efer(); -#ifndef CONFIG_XEN discover_ebda(); -#endif init_memory_mapping(0, (end_pfn_map << PAGE_SHIFT)); @@ -1378,9 +1378,7 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c) c->x86_capability[2] = cpuid_edx(0x80860001); } -#ifdef CONFIG_X86_XEN_GENAPIC c->apicid = phys_pkg_id(0); -#endif /* * Vendor-specific initialization. In this section we diff --git a/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c b/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c index fb20d9a33a..cc8cc85ce8 100644 --- a/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c +++ b/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c @@ -279,8 +279,8 @@ static __init void set_pte_phys(unsigned long vaddr, __flush_tlb_one(vaddr); } -static void set_pte_phys_ma(unsigned long vaddr, - unsigned long phys, pgprot_t prot) +static __init void set_pte_phys_ma(unsigned long vaddr, + unsigned long phys, pgprot_t prot) { pgd_t *pgd; pud_t *pud; @@ -361,9 +361,10 @@ __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t prot) } /* - * At this point it only supports vsyscall area. + * This only supports vsyscall area. */ -void __set_fixmap_user (enum fixed_addresses idx, unsigned long phys, pgprot_t prot) +void __init +__set_fixmap_user (enum fixed_addresses idx, unsigned long phys, pgprot_t prot) { unsigned long address = __fix_to_virt(idx); diff --git a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c index dea4b22923..853df13908 100644 --- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c +++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c @@ -349,8 +349,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) void __devinit smp_prepare_boot_cpu(void) { - cpu_present_map = cpumask_of_cpu(0); - cpu_online_map = cpumask_of_cpu(0); + prefill_possible_map(); } #ifdef CONFIG_HOTPLUG_CPU -- 2.30.2